package cn.concete;

import cn.Config;
import cn.WorkType;

import java.math.BigDecimal;
/**
 * 固定工资的员工，每月固定工资为6000元。
 *
 * */
public class SalaryWorkTypeConcete implements WorkType {

    private BigDecimal salaryMoney= null;
    private String birthday =null;

    public SalaryWorkTypeConcete(String birthday){
        salaryMoney = Config.salaryMoney;
        this.birthday =birthday;
    }

    @Override
    public BigDecimal calc() {
        if(checkToday(this.birthday)){
            System.out.println("该员工生日,工资额外加："+Config.birthDayMonty.toString());
            salaryMoney =salaryMoney.add(Config.birthDayMonty);
        }
        return salaryMoney;
    }
}
